package cn.yuanqiao.archive.storeRoom.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 档案盒中间表对象 YQDA_BOX
 * 
 * @author xy
 * @date 2023-06-30
 */
public class DaBox extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQDA_BOX";

    public DaBox() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            //throw new ServiceException("tenantCode is null");
            this.tableName="YQDA_BOX";
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }
    /** 档案id */
    @Excel(name = "档案id")
    private Long daId;

    /** boxId */
    @Excel(name = "boxId")
    private Long boxId;

    /** 盒号 */
    @Excel(name = "盒号")
    private Integer hehao;

    /** 分表名 */
    @Excel(name = "分表名")
    private String subTableName;

    /** 门类Id */
    @Excel(name = "门类Id")
    private Long categoryId;

    /** 是否出库 */
    @Excel(name = "是否出库")
    private Integer outboundStatus;

/*
    */
/** 类型 *//*

    @Excel(name = "类型")
    private String type;
*/

    private String tableName;

    public void setDaId(Long daId) 
    {
        this.daId = daId;
    }

    public Long getDaId() 
    {
        return daId;
    }
    public void setBoxId(Long boxId) 
    {
        this.boxId = boxId;
    }

    public Long getBoxId() 
    {
        return boxId;
    }
    public void setHehao(Integer hehao) 
    {
        this.hehao = hehao;
    }

    public Integer getHehao() 
    {
        return hehao;
    }
    public void setSubTableName(String subTableName) 
    {
        this.subTableName = subTableName;
    }

    public String getSubTableName() 
    {
        return subTableName;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }
    public void setOutboundStatus(Integer outboundStatus)
    {
        this.outboundStatus = outboundStatus;
    }

    public Integer getOutboundStatus()
    {
        return outboundStatus;
    }


    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("daId", getDaId())
            .append("boxId", getBoxId())
            .append("hehao", getHehao())
            .append("subTableName", getSubTableName())
            .append("categoryId", getCategoryId())
            .append("outboundStatus", getOutboundStatus())
            .toString();
    }
}
